<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

    protected function init ()
    {
        Zend_Session::start();
        
    }

    protected function _initLayoutModule ()
    {
        $front = Zend_Controller_Front::getInstance();
        
        /* Lấy các option resources trong file application.ini */
        $resources = $this->getOption('resources');
        
        /* Load Layout */
        $modules = $resources['modules']; // mảng tập hợp tên các modules
        $front->registerPlugin(new butkimtinh_Layout($modules));
        return $front;
    }

    protected function _initDB ()
    {
        $db = $this->getPluginResource('db')->getDbAdapter();
	    Zend_Registry::set('db',$db);
    }
}

